package game.targets;

import game.targets.entity.CollisionEntity;

import com.badlogic.gdx.physics.bullet.collision.ContactListener;
import com.badlogic.gdx.physics.bullet.collision.btCollisionObject;


public class CollisionHandler extends ContactListener implements Constants {
	@Override
    public void onContactStarted (btCollisionObject colObj0, btCollisionObject colObj1) {
        CollisionEntity a=(CollisionEntity) colObj0.userData;
        CollisionEntity b=(CollisionEntity) colObj1.userData;
        a.onCollide(b);
        b.onCollide(a);
    }
    @Override
    public void onContactProcessed (int userValue0, int userValue1) {
    }
}